/**前端登录业务类
*@author 
*/
var login={
    //AJAX检测用户名和密码的方法
    check:function(){
        var uname = $('input[name="username"]').val();
        var passwd = $('input[name="password"]').val();
        //执行异步请求
        var data={"username":uname,"password":passwd};
        var url="/admin.php?c=login&a=check";
        $.post(url,data,function(res){
            if(res.status == 0){
                return dialog.error(res.message);
            }
            if(res.status == 1){
                return dialog.success(res.message,'/index.php?m=admin&c=index');
            }
        },"JSON");
    },
 
}